/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 */

import { PoolConfig } from '../../../../../src/base/internal/pool/worker-pool/pool-config';
import { WorkerPoolFactory } from '../../../../../src/base/internal/pool/worker-pool/worker-pool-factory';
import { WorkerPoolType } from '../../../../../src/base/internal/pool/enum/worker-pool-type';

describe('test worker pool factory', () => {
  test('test getWorkerPool', () => {
    const poolConfig: PoolConfig = {};
    const workerPool=WorkerPoolFactory.getWorkerPool(WorkerPoolType.LOCAL, poolConfig);
    expect(workerPool).toBeDefined();
    const a: any = 1;
    expect(WorkerPoolFactory.getWorkerPool(a, poolConfig)).toBeUndefined();
    workerPool!.terminate();
  });
});
